Convert RGB Image to Greyscale.docx


NumPy Mini Project

Import the required libraries:

Load the image as a pixel matrix using Pillow:

Extract the R, G, and B channels from the NumPy array:

Process the pixel data to grayscale manually:

Gray=0.2989R+0.5870G+0.1140B

Convert the processed grayscale array back to an image:

Save or display the grayscale image using Pillow: